# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kio-admin
pkgver=23.08.4
pkgrel=0
pkgdesc="Manage files as administrator using the admin:// KIO protocol"
url="https://invent.kde.org/system/kio-admin"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="BSD-3-Clause AND (GPL-2.0-only OR GPL-3.0-only)"
# zstd is purely used to unpack the source archive
makedepends="
	extra-cmake-modules
	ki18n5-dev
	kio5-dev
	polkit-qt-dev
	qt5-qtbase-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/system/kio-admin.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kio-admin-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
5d9ef7a4288e7be85753c0313c3906d3a83baddc545dd9cf98679f8227b677e73e4e6152be4371fb9da2ba3b63cdd60938d44f86502ff5bfe98455687a0be2b6  kio-admin-23.08.4.tar.xz
"
